3.349 \(\int \frac {\log (c (a+b x)^n)}{d+e x+f x^2} \, dx\)

Optimal. Leaf size=243 \[ \frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (-\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (\sqrt {e^2-4 d f}+e\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}} \]

[Out]

ln(c*(b*x+a)^n)*ln(-b*(e+2*f*x-(-4*d*f+e^2)^(1/2))/(2*a*f-b*(e-(-4*d*f+e^2)^(1/2))))/(-4*d*f+e^2)^(1/2)-ln(c*(
b*x+a)^n)*ln(-b*(e+2*f*x+(-4*d*f+e^2)^(1/2))/(2*a*f-b*(e+(-4*d*f+e^2)^(1/2))))/(-4*d*f+e^2)^(1/2)+n*polylog(2,
2*f*(b*x+a)/(2*a*f-b*(e-(-4*d*f+e^2)^(1/2))))/(-4*d*f+e^2)^(1/2)-n*polylog(2,2*f*(b*x+a)/(2*a*f-b*(e+(-4*d*f+e
^2)^(1/2))))/(-4*d*f+e^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 243, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2418, 2394, 2393, 2391} \[ \frac {n \text {PolyLog}\left (2,\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {PolyLog}\left (2,\frac {2 f (a+b x)}{2 a f-b \left (\sqrt {e^2-4 d f}+e\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (-\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (\sqrt {e^2-4 d f}+e+2 f x\right )}{2 a f-b \left (\sqrt {e^2-4 d f}+e\right )}\right )}{\sqrt {e^2-4 d f}} \]

Antiderivative was successfully verified.

[In]

Int[Log[c*(a + b*x)^n]/(d + e*x + f*x^2),x]

[Out]

(Log[c*(a + b*x)^n]*Log[-((b*(e - Sqrt[e^2 - 4*d*f] + 2*f*x))/(2*a*f - b*(e - Sqrt[e^2 - 4*d*f])))])/Sqrt[e^2
- 4*d*f] - (Log[c*(a + b*x)^n]*Log[-((b*(e + Sqrt[e^2 - 4*d*f] + 2*f*x))/(2*a*f - b*(e + Sqrt[e^2 - 4*d*f])))]
)/Sqrt[e^2 - 4*d*f] + (n*PolyLog[2, (2*f*(a + b*x))/(2*a*f - b*(e - Sqrt[e^2 - 4*d*f]))])/Sqrt[e^2 - 4*d*f] -
(n*PolyLog[2, (2*f*(a + b*x))/(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))])/Sqrt[e^2 - 4*d*f]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\log \left (c (a+b x)^n\right )}{d+e x+f x^2} \, dx &=\int \left (\frac {2 f \log \left (c (a+b x)^n\right )}{\sqrt {e^2-4 d f} \left (e-\sqrt {e^2-4 d f}+2 f x\right )}-\frac {2 f \log \left (c (a+b x)^n\right )}{\sqrt {e^2-4 d f} \left (e+\sqrt {e^2-4 d f}+2 f x\right )}\right ) \, dx\\ &=\frac {(2 f) \int \frac {\log \left (c (a+b x)^n\right )}{e-\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}-\frac {(2 f) \int \frac {\log \left (c (a+b x)^n\right )}{e+\sqrt {e^2-4 d f}+2 f x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {(b n) \int \frac {\log \left (\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{-2 a f+b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{a+b x} \, dx}{\sqrt {e^2-4 d f}}+\frac {(b n) \int \frac {\log \left (\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{-2 a f+b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{a+b x} \, dx}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {2 f x}{-2 a f+b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{x} \, dx,x,a+b x\right )}{\sqrt {e^2-4 d f}}+\frac {n \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {2 f x}{-2 a f+b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{x} \, dx,x,a+b x\right )}{\sqrt {e^2-4 d f}}\\ &=\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e-\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {\log \left (c (a+b x)^n\right ) \log \left (-\frac {b \left (e+\sqrt {e^2-4 d f}+2 f x\right )}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}+\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e-\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}-\frac {n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 194, normalized size = 0.80 \[ \frac {\log \left (c (a+b x)^n\right ) \left (\log \left (\frac {b \left (\sqrt {e^2-4 d f}-e-2 f x\right )}{2 a f+b \sqrt {e^2-4 d f}+b (-e)}\right )-\log \left (\frac {b \left (\sqrt {e^2-4 d f}+e+2 f x\right )}{b \left (\sqrt {e^2-4 d f}+e\right )-2 a f}\right )\right )+n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f+b \left (\sqrt {e^2-4 d f}-e\right )}\right )-n \text {Li}_2\left (\frac {2 f (a+b x)}{2 a f-b \left (e+\sqrt {e^2-4 d f}\right )}\right )}{\sqrt {e^2-4 d f}} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(a + b*x)^n]/(d + e*x + f*x^2),x]

[Out]

(Log[c*(a + b*x)^n]*(Log[(b*(-e + Sqrt[e^2 - 4*d*f] - 2*f*x))/(-(b*e) + 2*a*f + b*Sqrt[e^2 - 4*d*f])] - Log[(b
*(e + Sqrt[e^2 - 4*d*f] + 2*f*x))/(-2*a*f + b*(e + Sqrt[e^2 - 4*d*f]))]) + n*PolyLog[2, (2*f*(a + b*x))/(2*a*f
 + b*(-e + Sqrt[e^2 - 4*d*f]))] - n*PolyLog[2, (2*f*(a + b*x))/(2*a*f - b*(e + Sqrt[e^2 - 4*d*f]))])/Sqrt[e^2
- 4*d*f]

________________________________________________________________________________________

fricas [F]  time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\log \left ({\left (b x + a\right )}^{n} c\right )}{f x^{2} + e x + d}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x+a)^n)/(f*x^2+e*x+d),x, algorithm="fricas")

[Out]

integral(log((b*x + a)^n*c)/(f*x^2 + e*x + d), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left ({\left (b x + a\right )}^{n} c\right )}{f x^{2} + e x + d}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x+a)^n)/(f*x^2+e*x+d),x, algorithm="giac")

[Out]

integrate(log((b*x + a)^n*c)/(f*x^2 + e*x + d), x)

________________________________________________________________________________________

maple [C]  time = 0.26, size = 689, normalized size = 2.84 \[ \frac {b n \ln \left (\frac {2 a f -b e -2 \left (b x +a \right ) f +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right ) \ln \left (b x +a \right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {b n \ln \left (\frac {-2 a f +b e +2 \left (b x +a \right ) f +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{-2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right ) \ln \left (b x +a \right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {i \pi \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )}{\sqrt {4 d f -e^{2}}}+\frac {i \pi \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}+\frac {i \pi \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{2}}{\sqrt {4 d f -e^{2}}}-\frac {i \pi \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \mathrm {csgn}\left (i c \left (b x +a \right )^{n}\right )^{3}}{\sqrt {4 d f -e^{2}}}+\frac {b n \dilog \left (\frac {2 a f -b e -2 \left (b x +a \right ) f +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{2 a f -b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}-\frac {b n \dilog \left (\frac {-2 a f +b e +2 \left (b x +a \right ) f +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}{-2 a f +b e +\sqrt {-4 b^{2} d f +b^{2} e^{2}}}\right )}{\sqrt {-4 b^{2} d f +b^{2} e^{2}}}+\frac {2 \left (-n \ln \left (b x +a \right )+\ln \left (\left (b x +a \right )^{n}\right )\right ) b \arctan \left (\frac {-2 a f +b e +2 \left (b x +a \right ) f}{\sqrt {4 b^{2} d f -b^{2} e^{2}}}\right )}{\sqrt {4 b^{2} d f -b^{2} e^{2}}}+\frac {2 \arctan \left (\frac {2 f x +e}{\sqrt {4 d f -e^{2}}}\right ) \ln \relax (c )}{\sqrt {4 d f -e^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(b*x+a)^n)/(f*x^2+e*x+d),x)

[Out]

2*b*(-n*ln(b*x+a)+ln((b*x+a)^n))/(4*b^2*d*f-b^2*e^2)^(1/2)*arctan((2*(b*x+a)*f-2*a*f+b*e)/(4*b^2*d*f-b^2*e^2)^
(1/2))+b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*ln(b*x+a)*ln((-2*(b*x+a)*f+2*a*f-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2))/(2*a*f-
b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))-b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*ln(b*x+a)*ln((2*(b*x+a)*f-2*a*f+b*e+(-4*b^2*d*
f+b^2*e^2)^(1/2))/(-2*a*f+b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))+b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*dilog((-2*(b*x+a)*f+
2*a*f-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2))/(2*a*f-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))-b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*d
ilog((2*(b*x+a)*f-2*a*f+b*e+(-4*b^2*d*f+b^2*e^2)^(1/2))/(-2*a*f+b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))+I/(4*d*f-e^2)
^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*(b*x+a)^n)*csgn(I*c*(b*x+a)^n)^2-I/(4*d*f-e^2)^(1/2)*arct
an((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*(b*x+a)^n)*csgn(I*c*(b*x+a)^n)*csgn(I*c)-I/(4*d*f-e^2)^(1/2)*arctan(
(2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*c*(b*x+a)^n)^3+I/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*
Pi*csgn(I*c*(b*x+a)^n)^2*csgn(I*c)+2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*ln(c)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x+a)^n)/(f*x^2+e*x+d),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*d*f-e^2>0)', see `assume?` f
or more details)Is 4*d*f-e^2 positive or negative?

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\ln \left (c\,{\left (a+b\,x\right )}^n\right )}{f\,x^2+e\,x+d} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b*x)^n)/(d + e*x + f*x^2),x)

[Out]

int(log(c*(a + b*x)^n)/(d + e*x + f*x^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log {\left (c \left (a + b x\right )^{n} \right )}}{d + e x + f x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(b*x+a)**n)/(f*x**2+e*x+d),x)

[Out]

Integral(log(c*(a + b*x)**n)/(d + e*x + f*x**2), x)

________________________________________________________________________________________